<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="p"%>
<%String path=request.getContextPath(); %>

<script>
function menu_sort(){
	var opt=document.getElementById('selmenuIds');
	if(opt.options.length>0){
		comboxOperator.selectAll(opt);
		return $w.doWinForm(menusortcallback);
	}
	else{
		$w.closeCurrWin();
		return false;
	}
}
function menusortcallback(json){
	if(json.state=='ok'){
		$w.closeCurrWin('ok');
	}
}
</script>

<form method="post" action="/platform/menu/MenuPage.page">
	<p:hidden bind="actions"/>
	<table width="100%">
	<tr>
	<td>
	<select name="menuIds" id="selmenuIds" style="width:180px;height:230px" multiple="true">
              <p:iterate id="menu" bind="subMenuList">
                  <option value="<p:write bind="#menu.id"/>"><p:write bind="#menu.name"/></option>
             </p:iterate>
             </select>
	</td>
	<td valign="top">
	<div style="float:left;margin-top:25px;margin-left:10px;">
		<a href="#" class="easyui-linkbutton" onclick="comboxOperator.up(document.getElementById('selmenuIds'));">上移</a>
		<a href="#" class="easyui-linkbutton" onclick="comboxOperator.down(document.getElementById('selmenuIds'));" style="margin-top:12px">下移</a>
		<a href="#" class="easyui-linkbutton" onclick="menu_sort()" style="margin-top:12px">确定</a>
		<a href="#" class="easyui-linkbutton" onclick="$w.closeCurrWin()" style="margin-top:12px">取消</a>
	</div>
	</td>
	</tr>
	</table>
</form>
